package com.transaction.manage.model.dto;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

@Table(name = "flow_log")
public class FlowLog implements Serializable {
    @Id
    private Integer id;

    private String logCode;

    /**
     * 处理的流程编码
     */
    @Column(name = "flow_code")
    private String flowCode;

    @Column(name = "channel_code")
    private String channelCode;
    private String channelName;

    /**
     * 处理日期yyyy-mm-dd
     */
    @Column(name = "handle_date")
    private String handleDate;

    /**
     * 处理流程步骤
     */
    @Column(name = "step_code")
    private Integer stepCode;

    /**
     * 处理流程步骤名称
     */
    @Column(name = "step_name")
    private String stepName;

    /**
     * 处理状态；0：初始状态；1：成功；2：失败
     */
    private Integer status;
    private String statusName;

    @Column(name = "begin_date")
    private Date beginDate;

    @Column(name = "end_date")
    private Date endDate;

    @Column(name = "error_msg")
    private String errorMsg;

    private Date utime;

    private static final long serialVersionUID = 1L;

    public FlowLog() {
    }

    public FlowLog(String handleDate) {
        this.handleDate = handleDate;
    }

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    public String getLogCode() {
        return logCode;
    }

    public void setLogCode(String logCode) {
        this.logCode = logCode;
    }

    /**
     * 获取处理的流程编码
     *
     * @return flow_code - 处理的流程编码
     */
    public String getFlowCode() {
        return flowCode;
    }

    /**
     * 设置处理的流程编码
     *
     * @param flowCode 处理的流程编码
     */
    public void setFlowCode(String flowCode) {
        this.flowCode = flowCode;
    }

    /**
     * @return channel_code
     */
    public String getChannelCode() {
        return channelCode;
    }

    /**
     * @param channelCode
     */
    public void setChannelCode(String channelCode) {
        this.channelCode = channelCode;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    /**
     * 获取处理日期yyyy-mm-dd
     *
     * @return handle_date - 处理日期yyyy-mm-dd
     */
    public String getHandleDate() {
        return handleDate;
    }

    /**
     * 设置处理日期yyyy-mm-dd
     *
     * @param handleDate 处理日期yyyy-mm-dd
     */
    public void setHandleDate(String handleDate) {
        this.handleDate = handleDate;
    }

    /**
     * 获取处理流程步骤
     *
     * @return step_code - 处理流程步骤
     */
    public Integer getStepCode() {
        return stepCode;
    }

    /**
     * 设置处理流程步骤
     *
     * @param stepCode 处理流程步骤
     */
    public void setStepCode(Integer stepCode) {
        this.stepCode = stepCode;
    }

    /**
     * 获取处理流程步骤名称
     *
     * @return step_name - 处理流程步骤名称
     */
    public String getStepName() {
        return stepName;
    }

    /**
     * 设置处理流程步骤名称
     *
     * @param stepName 处理流程步骤名称
     */
    public void setStepName(String stepName) {
        this.stepName = stepName;
    }

    /**
     * 获取处理状态；0：初始状态；1：成功；2：失败
     *
     * @return status - 处理状态；0：初始状态；1：成功；2：失败
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 设置处理状态；0：初始状态；1：成功；2：失败
     *
     * @param status 处理状态；0：初始状态；1：成功；2：失败
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    /**
     * @return begin_date
     */
    public Date getBeginDate() {
        return beginDate;
    }

    /**
     * @param beginDate
     */
    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    /**
     * @return end_date
     */
    public Date getEndDate() {
        return endDate;
    }

    /**
     * @param endDate
     */
    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    /**
     * @return utime
     */
    public Date getUtime() {
        return utime;
    }

    /**
     * @param utime
     */
    public void setUtime(Date utime) {
        this.utime = utime;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", flowCode=").append(flowCode);
        sb.append(", channelCode=").append(channelCode);
        sb.append(", handleDate=").append(handleDate);
        sb.append(", stepCode=").append(stepCode);
        sb.append(", stepName=").append(stepName);
        sb.append(", status=").append(status);
        sb.append(", beginDate=").append(beginDate);
        sb.append(", endDate=").append(endDate);
        sb.append(", utime=").append(utime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}